/*检验姓名*/
function checkName(){
	var a=document.getElementById("bn");
	var b=document.getElementById("nameee");
	b.innerHTML="";
	if(a.value==""){
		a.style.border="solid 1px red";
		b.innerHTML="<font color='#FF0000'>书籍名不能为空！</font>";
		return false;
	}
	return true;
}
/*检验数量*/
function renum(){
	var a=document.getElementById("num");
	var b=document.getElementById("errnum");
	b.innerHTML="";
	regx=/^\d+$/;
	if(regx.test(a.value)==false){
			a.style.border="solid 1px red";
		b.innerHTML="<font color='#FF0000'>书籍数量为数字！</font>";
		return false;
	}return true;
}
/*检验价格*/
function repric(){
	var idd=document.getElementById("pric");
	var idNum=document.getElementById("errpric");
	idNum.innerHTML="";
	var regx=/^\d+$/;
	if(regx.test(idd.value)==false){
			idd.style.border="solid 1px red"
		idNum.innerHTML="<font color='#FF0000'>书籍价格为数字！</font>";
		return false;
	}
	return true;	
} 